package com.woniu.controller.homepage;

import com.woniu.service.homePage.IImageService;
import com.woniu.util.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 86180
 * @data 2023/3/11 16:43
 */
@RestController
@RequestMapping("/app/image")
public class ImageController {

    @Autowired
    private IImageService imageService;

    /**
     * 根据商品id查询所属的图片
     * @param goodsId
     * @return
     */
    @RequestMapping("/queryImage")
    public ResData<?> queryImageByGoodsId(Integer goodsId){
        return imageService.queryImageByGoodsId(goodsId);
    }

}
